namespace MDSAdministration
{
    public class CompareAttribute
    {
        public string Name { get; set; }
        public int SortOrder { get; set; }
        public int MemberType { get; set; }
        public bool IsSystem { get; set; }
        public string MUID { get; set; }
        public string DisplayName { get; set; }
        public string TableColumn { get; set; }
        public int AttributeTypeID { get; set; }
        public int DataTypeID { get; set; }
        public int? DataTypeInformation { get; set; }
        public int InputMaskID { get; set; }
        public int DisplayWidth { get; set; }
        public int? DomainEntityID { get; set; }
        public string DomainEntityName { get; set; }
        public string DomainEntityMUID { get; set; }
        public int ChangeTrackingGroup { get; set; }
        public bool IsCode { get; set; }
        public bool IsName { get; set; }
        public bool IsReadOnly { get; set; }
        public int? AttributeValidationID { get; set; }
        public bool IsRequired { get; set; }

        public CompareEntity Entity { get; set; }

        //used for reordering
        public int ChangeSortOrder { get; set; }

        public static string getAttributeKey(string AttributeName, int MemberType)
        {
            return AttributeName + "_" + MemberType.ToString();
        }

        public bool isDomainAttribute
        {
            get
            {
                if (DomainEntityID == null || DomainEntityID.HasValue == false)
                {
                    return false;
                }
                return true;
            }
        }
    }
}